using QFramework;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public enum LaunchState
{
    InitNetwork,
    InitGameConfig,
    EnterGame,
}

public class Launch : MonoBehaviour, IController
{
    public FSM<LaunchState> FSM = new FSM<LaunchState>();

    private void Awake()
    {
        DontDestroyOnLoad(gameObject);
    }

    private void Start()
    {
        FSM.AddState(LaunchState.InitNetwork, new InitNetworkState(FSM, this));
        FSM.AddState(LaunchState.InitGameConfig, new InitGameConfigState(FSM, this));
        FSM.AddState(LaunchState.EnterGame, new EnterGameState(FSM, this));

        FSM.StartState(LaunchState.InitNetwork);
    }

    private void Update()
    {
        FSM.Update();
    }

    public IArchitecture GetArchitecture()
    {
        return DigitalTwin_GeLinMei_2.Interface;
    }
}
